#ifndef PELEMENT_H_
#define PELEMENT_H_

#include "Element.h"

class PElement:public Element{
private:
	Matrix cond,gradien,conv;
	Vector fGen,fFlux,fConv,force;
	int fbc1,fbc2,cbc1,cbc2;
public:
	PElement();
	virtual ~PElement();
	PElement(const int &label);
	
	Matrix & Cond(){return cond;}
	Matrix & Gradien(){return gradien;}
	Matrix & Conv(){return conv;}
	
	Vector & FGen(){return fGen;}
	Vector & FFlux(){return fFlux;}
	Vector & FConv(){return fConv;}
	Vector & Force(){return force;}
	
	void constructCond(const double &rho, const double &cp);
	void constructGradien(const double &kx, const double &ky, const double &w);
	void constructConv(const double &h,const double &w);
	
	void constructfFlux(const double &q,const double &w);
	void constructfGen(const double &ugen, const double &w);
	void constructfConv(const double &h, const double &Tf, const double &w);
	void constructForce(const double &q,const double &h,const double &w,const double &gen, const double &Tf);
	
	void setFB1(const int &fbc1){
		this->fbc1=fbc1;
		if(exposed==false)
			exposed=true;
	}
	int & FB1(){return fbc1;}
	void setFB2(const int &fbc2){
		this->fbc2=fbc2;
		if(exposed==false)
			exposed=true;
	}
	int & FB2(){return fbc2;}
	void setCB1(const int &cbc1){
		this->cbc1=cbc1;
		if(exposed==false)
			exposed=true;
	}
	int & CB1(){return cbc1;}
	void setCB2(const int &cbc2){
		this->cbc2=cbc2;
		if(exposed==false)
			exposed=true;
	}
	int & CB2(){return cbc2;}
	
};
#endif /**/
